//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#ifndef NATIVE_SYSTEM_BASE_TIME_H
#define NATIVE_SYSTEM_BASE_TIME_H

#ifndef NATIVE_SYSTEM_BASE_OBJECT_H
#include "System/Base/Object.h"
#endif

namespace Native { namespace System
{
    //****************************************************************************************************************//
    //CTime
    //
    //****************************************************************************************************************//
    NATIVE_DECLARE_CONST_OBJECT(CTime, C_TIME);
    class NATIVE_LIBRARY_EXPORT CTime :
        public CObject
    {
        NATIVE_DECLARE_OBJECT;

    private:
        //@
        time_t _ticks;

    private:
        CTime();

    public:
        CTime(const CTime& that);
        CTime(time_t ticks);
        CTime(
            uint32_t year,
            uint32_t month,
            uint32_t day,
            uint32_t hour = 0,
            uint32_t minute = 0,
            uint32_t second = 0);

    public:
        static CTime Now();

        virtual wstring ToString() const;

        time_t Utc() const;
        wstring ToLocalTimeString() const;
        wstring ToUtcTimeString() const;

    public:
        const CTime& operator=(const CTime& that);
    };
}}

#endif
